<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
      layout:decorate="~{common/common}">
<head>
    <title>学生查询信息</title>
</head>

<body layout:fragment="content">
<nav class="breadcrumb">
    <i class="Hui-iconfont">&#xe67f;</i>
    首页
    <span class="c-gray en">&gt;</span>学生查询信息管理 <span class="c-gray en">&gt;</span>
    学生查询信息列表
    <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px"
       href="javascript:location.replace(location.href);" title="刷新">
        <i class="Hui-iconfont">&#xe68f;</i>
    </a>
</nav>
<form id="myForm" th:action="@{/student/list}" th:method="get">
    <div class="page-container">
        <div class="text-c">
            <span class="">搜索条件：</span>
            <input type="text" class="input-text" style="width:150px" placeholder="学生姓名" id="sname" name="sname"
                   th:value="${sname}"/>
            <input type="text" class="input-text" style="width:150px" placeholder="学生年龄" id="age" name="age"
                   th:value="${age}"/>
            <button type="submit" class="btn btn-success">
                <i class="Hui-iconfont">&#xe665;</i>
                搜索
            </button>
        </div>
        <div class="cl pd-5 bg-1 bk-gray mt-20">
            <span class="l">
                <a href="javascript:;"
                   th:onclick="'javascript:add(\'添加学生信息\',\'/student/to/add\',\'900\',\'600\');'"
                   class="btn btn-primary radius"><i class="Hui-iconfont">&#xe600;</i> 添加</a>
            </span>
            <span class="r">共有数据：<strong th:text="${pageInfo?.total}" id="total"></strong> 条</span>
        </div>
        <table class="table table-border table-bordered table-bg table-hover">
            <thead>
            <tr>
                <th scope="col" colspan="12">学生信息</th>
            </tr>
            <tr class="text-c">
                <th>学号</th>
                <th>姓名</th>
                <th>性别</th>
                <th>描述</th>
                <th>生日</th>
                <th>年龄</th>
                <th>创建时间</th>
                <th>更新时间</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <tr class="text-c" th:each="model:${pageInfo?.list}" th:object="${model}">
                <td th:text="*{sno}"></td>
                <td th:text="*{sname}"></td>
                <td class="td-status">
                    <span th:if="*{sex eq '1'}">男</span>
                    <span th:if="*{sex eq '0'}">女</span>
                </td>
                <td th:text="*{dept}"></td>
                <td th:text="*{birth}"></td>
                <td th:text="*{age}">&nbsp;岁</td>
                <td th:text="*{createTime}"></td>
                <td th:text="*{updateTime}"></td>
                <td class="td-manage">
                    <a title="编辑" href="javascript:;"
                       th:onclick="'javascript:edit(\'学生信息编辑\',\'/student/edit/'+*{sno}+'\',\'900\',\'600\');'"
                       class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6df;</i></a>
                    <span><a title="删除" href="javascript:;"
                             th:onclick="'javascript:del(1, \'/student/status/'+*{sno}+'\');'"
                             class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6e2;</i></a></span>
                </td>
            </tr>
            </tbody>
        </table>
        <div th:replace="common/page :: page"></div>
    </div>
</form>

<script type="text/javascript" th:src="@{/js/page.js}"></script>
<script type="text/javascript" th:src="@{/js/student/student-list.js}"></script>
<script th:inline="javascript">
</script>
</body>
</html>